﻿using System.Web.Mvc;
using Sharp.Platform.Mvc.Models;
using System.Web;

namespace Sharp.Platform.Mvc.Filter
{
    //[DebuggerStepThrough]
    public class PostBackActionFilter : IActionFilter
    {
        public void OnActionExecuted(ActionExecutedContext filterContext)
        {
        }

        public void OnActionExecuting(ActionExecutingContext filterContext)
        {
            HttpContextBase httpContext = filterContext.HttpContext;

            ContentResult cr = new ContentResult();

             

            //将当前的上下文的ActionResult设置为我们的cr(ContentResult)

            filterContext.Result = filterContext.Result;
        }

    }
}